package com.sita.bike.model;

import com.sita.bike.persistence.Person;

public class EaseUser2 extends Person {

    /**
     * 昵称首字母
     */
    protected String initialLetter;
    /**
     * 用户头像
     */
    protected String avatar;
    protected String username;

    public String getGender() {
        return gender;
    }

    public void setGender(String gender) {
        this.gender = gender;
    }

    protected String gender;

    public void setAccountId(String accountId) {
        this.accountId = accountId;
    }

    protected String accountId;

    public void setNick(String nick) {
        this.nick = nick;
    }

    protected String nick;

    public EaseUser2(String username) {
        this.username = username;
    }

    public String getAccountId() {
        return this.accountId;
    }

    public String getInitialLetter() {
        return initialLetter;
    }

    public void setInitialLetter(String initialLetter) {
        this.initialLetter = initialLetter;
    }


    public String getAvatar() {
        return avatar;
    }

    public void setAvatar(String avatar) {
        this.avatar = avatar;
    }

    @Override
    public int hashCode() {
        return 17 * getUsername().hashCode();
    }

    @Override
    public boolean equals(Object o) {
        if (o == null || !(o instanceof EaseUser2)) {
            return false;
        }
        return getUsername().equals(((EaseUser2) o).getUsername());
    }

    @Override
    public String toString() {
        return nick == null ? username : nick;
    }

    public String getUsername() {
        return username;
    }

    public String getNick() {
        return nick;
    }


}